home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
misc
/
installer
/
examples
/
processes.installer
< prev
next >
Wrap
Text File
|
1999-04-19
|
2KB
|
69 lines
(set #startcount 100)
(user expert)
(message "\n\nThis is a small performance test :)\n\n"
"There are 4 WHILE loops, all counting from " #startcount "\n"
"down to 0. One time this will be done concurrently\n"
"(for every WHILE one process) and then these WHILE\n"
"loops running one after the other...\n"
"Let`s see, what is faster!"
)
; *******************************************************************
(message "Now trying CONCURRENT-DO")
(working "\nPlease be patient - this will take some time.")
(set #before1 (database "time"))
(concurrent-do (
(set i #startcount)
(while i (set i (- i 1)))
)
(
(set j #startcount)
(while j (set j (- j 1)))
)
(
(set k #startcount)
(while k (set k (- k 1)))
)
(
(set l #startcount)
(while l (set l (- l 1)))
)
)
(set #after1 (database "time"))
; *******************************************************************
(message "And now the good old sequence")
(working "\nPlease be patient - this will take some time.")
(set #before2 (database "time"))
(
(set i #startcount)
(while i (set i (- i 1)))
)
(
(set j #startcount)
(while j (set j (- j 1)))
)
(
(set k #startcount)
(while k (set k (- k 1)))
)
(
(set l #startcount)
(while l (set l (- l 1)))
)
(set #after2 (database "time"))
; *******************************************************************
(exit "\nDone...\n\n"
("concurrent: %s - %s\nsequencial: %s - %s" #before1 #after1 #before2 #after2)
(quiet)
)
(welcome)